<template>
	<view class="container">
		<view class="content">
			<view class="title">隐私权政策提示</view>
			<view class="info">
				请您使用壹度便利小程序前点击<view class="detail"><text @click="openPrivacy">《隐私政策》,</text><text
						@click="openService">《壹度便利用户服务协议》</text></view>并仔细阅读。如您同意协议全部内容，请点击“同意并继续”开始使用我们的服务
			</view>
			<view class="btn-container">
				<button id="agree-btn" open-type="agreePrivacyAuthorization" class="btn"
					@agreeprivacyauthorization="handleAgreePrivacyAuthorization">同意并继续</button>
				<view class="dis-btn" @click="disAgree">不同意</view>
			</view>

		</view>

	</view>
</template>

<script>
	export default {
		props: {

		},
		methods: {
			handleAgreePrivacyAuthorization() {
				this.$emit('agree')


			},
			disAgree() {
				this.$emit('agree')
				uni.switchTab({
					url: '/pages/home/index'
				})
			},
			openPrivacy() {
				console.log(222)
				uni.navigateTo({
					url: '/pages/privacy/index'
				})
			},

			openService() {
				console.log(111)
				uni.navigateTo({
					url: '/pages/service/index'
				})
			}
		}
	};
</script>

<style lang="scss" scoped>
	.container {
		width: 100vw;
		height: 100vh;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		background: rgba(0, 0, 0, 0.7);
		position: fixed;
		left: 0;
		top: 0;
		z-index: 99;

		.content {
			width: 594rpx;
			height: 420rpx;
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			align-items: center;
			border-radius: 16rpx;
			background: #fff;
			margin-bottom: 64rpx;
			background-position: 100% 100%;
			background-repeat: no-repeat;
			background-size: 100% 100%;
			padding: 40rpx 36rpx;
			border: 2rpx solid;
			background-size: 100%;
			position: relative;

			.title {
				color: #333;
				font-size: 36rpx;
				font-weight: 600;
				margin-bottom: 24rpx;
			}

			.info {
				font-size: 24rpx;
				color: #666;
				line-height: 40rpx;

				.detail {
					color: #6a431f;
					line-height: 40rpx;
					height: 40rpx;
				}
			}

			.btn-container {
				width: 100%;
				display: flex;
				align-items: center;
				justify-content: space-between;

				.btn {
					width: 40%;
					border-radius: 48rpx;
					background: #ffdc2f;
					font-size: 28rpx;
					line-height: 60rpx;
					display: flex;
					align-items: center;
					justify-content: center;
					margin: 0;
				}

				.dis-btn {
					width: 40%;
					border-radius: 48rpx;
					background: #ffdc2f;
					font-size: 28rpx;
					line-height: 60rpx;
					display: flex;
					align-items: center;
					justify-content: center;
				}
			}

		}
	}
</style>